<?php
use yii\helpers\Html;

?>
<div class="yx-cnt-box yx-praise-content yx-radius2" style="margin-bottom: 10px;">
    <div class="yx-praise-box">
        <h3 class="yx-menubar">好评率统计 > <a href="<?= \common\components\helpers\Fun::url(['positive/index']) ?>">机构列表</a>
            > <a href="#">教师列表</a></h3>
        <a href="<?= \common\components\helpers\Fun::url(['positive/index']) ?>">
            <button class="yx-back-list yx-radius5">返回上级列表</button>
        </a>
        <div class="yx-bgf7f7f7" style="margin-top:15px;">
            <div class="yx-teacher-praise2 yx-floatl">
                <h3 class="yx-praise-title"><?= $mechanic['name'] ?>-好评率：</h3>
                <div class="yx-praise-rate-box">
                    <span class="yx-tab yx-bg78dd8c">当月</span>
                    <span class="yx-praise-rate"><?= $mechanic_score_now ?>%</span>
                    <span class="yx-tab yx-bg88abda  yx-ml15 yx-mleft6">累计</span>
                    <span class="yx-praise-rate"><?= $mechanic_score_all ?>%</span>
                </div>
            </div>
            <div class="yx-function yx-teacher-praise-function">
                <?= Html::beginForm(\common\components\helpers\Fun::url(['positive/indexteacher','mechanic_id'=>$mechanic['id']]), 'get', ['class' => 'yx-width43']) ?>
                <?= \common\components\helpers\Search::textInput('teacher_name', null, ['label' => '教师姓名', 'class' => 'yx-input-text yx-input-text1', 'id' => 'teachername']); ?>
                <?= \common\components\helpers\Search::submitButton('搜索', ['id' => 'search-handle', 'class' => "yx-search1 yx-radius2"]); ?>
                <?= Html::endForm() ?>
                <a href="<?= \common\components\helpers\Fun::url(['positive/indexteacher','mechanic_id'=>$mechanic['id'],'sort'=>-1]) ?>">
                    <button class="yx-toptolow yx-toptolow1 yx-radius2" type="button"><span>由高到低</span> ↑</button>
                </a>
                <a href="<?= \common\components\helpers\Fun::url(['positive/indexteacher','mechanic_id'=>$mechanic['id'],'sort'=>1]) ?>">
                    <button class="yx-lowtotop yx-lowtotop1 yx-radius2" type="button"><span>由低到高</span> ↓</button>
                </a>
            </div>
            <div class="yx-clear"></div>
        </div>
        <div class="yx-praise-list-box zx-mg">
            <?php foreach ($data as $k => $v) { ?>
                <div class=" yx-praise-item yx-praise-teacher-item  yx-width318 yx-pb0 yx-radius3 "><a
                            href="<?= \common\components\helpers\Fun::url(['positive/indexparent', 'teacher_id' => $v['id']]) ?>">
                        <div class=" yx-img-bg yx-floatl"><img
                                    class="yx-teacher-img yx-teacher-img1 yx-border3 yx-radius50"
                                    src="<?= $v['img'] ?>"/>
                            <h3 class="yx-teacher-name yx-teacher-name1"><?= $v['teacher_name'] ?></h3>
                            <h4 class="yx-group"><?= $v['cate_name'] ?></h4>
                        </div>
                        <div class="yx-praise-teacher yx-floatl">
                            <h5>本月<span class="yx-rate1"><?= $v['teacher_score_now'] ?>%</span></h5>
                            <div class="progress yx-progress1 yx-radius5">
                                <?php if ($v['teacher_score_now'] <= 60) { ?>
                                    <div class="bar yx-radius5 yx-bgff79c5"
                                         style="width: <?= $v['teacher_score_now'] ?>%;"></div>
                                <?php } elseif ($v['teacher_score_now'] > 80) { ?>
                                    <div class="bar yx-radius5 yx-bg78dd8c"
                                         style="width: <?= $v['teacher_score_now'] ?>%;"></div>
                                <?php } else { ?>
                                    <div class="bar yx-radius5 yx-bg94b5ff"
                                         style="width: <?= $v['teacher_score_now'] ?>%;"></div>
                                <?php } ?>
                            </div>
                            <h5>累计<span class="yx-rate1"><?= $v['teacher_score_all'] ?>%</span></h5>
                            <div class="progress yx-progress1 yx-radius5">
                                <?php if ($v['teacher_score_all'] <= 60) { ?>
                                    <div class="bar yx-radius5 yx-bgff79c5"
                                         style="width: <?= $v['teacher_score_all'] ?>%;"></div>
                                <?php } elseif ($v['teacher_score_all'] > 80) { ?>
                                    <div class="bar yx-radius5 yx-bg78dd8c"
                                         style="width: <?= $v['teacher_score_all'] ?>%;"></div>
                                <?php } else { ?>
                                    <div class="bar yx-radius5 yx-bg94b5ff"
                                         style="width: <?= $v['teacher_score_all'] ?>%;"></div>
                                <?php } ?>
                            </div>
                            <button class="yx-look yx-teacher-look yx-teacher-look yx-radius50 " type="button">查看详情
                            </button>
                        </div>
                    </a>
                    <div class="yx-clear"></div>
                </div>
            <?php } ?>
        </div>
    </div>
</div>